/**
 * index页面的一些api
 */
import request from '@/config/axios'

export const getBannerList = () =>
  request.get({ url: '/api/onlyforone/banner/index' })

export const getCaseListOfIndex = () =>
  request.get({ url: '/api/onlyforone/cases/index' })

export const getUnionListOfIndex = () =>
  request.get({ url: '/api/onlyforone/businessPartner/index' })

export const getCategoryList = () =>
  request.get({ url: '/api/onlyforone/routes/index' })

export const getAppConfig = () =>
  request.get({ url: '/api/apps/application/forone' })

export const getSetting = () =>
  request.get({ url: '/api/onlyforone/setting/index' })


export const getPdfList = () =>
  request.get({ url: '/api/onlyforone/pdfList/index' })


export const getNearestStoreApi = (params: Object) =>
  request.get({ url: '/api/onlyforone/setting/getNearestStore', params })

export const getDistFromStore = (params: Object) =>
  request.get({ url: '/api/onlyforone/setting/getDistFromStore', params })

export const postError = (error,url,stack) =>
  request.post({
    url: '/api/onlyforone/errorLog/s', params: {
      error,
      url,
      stack
    }
  })